﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="yibaofei.aspx.cs" Inherits="wc_zcgl_yibaofei" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>已经报废资产</title>
<style type="text/css">
<!--
.style1 {	color: #FFFFFF;
	font-weight: bold;
}
-->
</style>


 <link href="../css/link.css"rel="stylesheet" type="text/css" />
</head>
<body>
<% COM.OA.Entity.users loginuser = Session["loginuser"] as COM.OA.Entity.users;
   if (loginuser == null)
   {
       this.Response.Write(string.Format(GetRedirect.ALLREDIRECT, "../login.aspx"));
   } %>
    <form id="form1" runat="server">
    <div align="center">
    <table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><form name="form1" method="post" action="">
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="13%">                          
          　<a href="weibaofei.aspx">尚未报废资产</a> 　　<a href="yibaofei.aspx">已经报废资产 </a></td>
          </tr>
      </table>
    </form></td>
  </tr>
</table>
</div>
<div align="center">
  <table width="760" height="21" border="0" cellpadding="0" cellspacing="0"  background="../images/images_wc/line.gif">
    <tr>
      <td><div align="center"><span class="style1">资产管理系统</span></div></td>
    </tr>
  </table>
  <table width="760" border="0" cellpadding="0" cellspacing="1" bgcolor="#5AAE18">
    <tr>
      <td bgcolor="#FFFFFF"><table width="100%"  border="0" cellpadding="3" cellspacing="0">
        <tr bgcolor="#FFFFFF">
          <td width="11%"><div align="center">名称</div></td>
          <td width="9%"><div align="center">使用日期</div></td>
          <td width="12%"><div align="center">使用部门</div></td>
          <td width="12%"><div align="center">生产商</div></td>
          <td width="12%"><div align="center">生产年月</div></td>
          <td width="12%"><div align="center">购买价格</div></td>
          <td width="10%"><div align="center">安装费</div></td>
          <td width="10%"><div align="center">折旧</div></td>
          <td width="12%"><div align="center">净值</div></td>
        </tr>
         <%
             
            //取登陆人信息 

            COM.OA.Entity.users loginuser = Session["loginuser"] as COM.OA.Entity.users;
            //如果取不到跳转到登陆页
            if (loginuser == null)
            {
                this.Response.Write(string.Format(GetRedirect.ALLREDIRECT, "../login.aspx"));
            }
            else
            {
            
             %>
        <%
             System.Data.SqlClient.SqlParameter parameter = new System.Data.SqlClient.SqlParameter("@i", 0);
        %>
        <%System.Collections.Generic.IList<COM.OA.Entity.wc_assetmanage> list = COM.OA.BLL.BLLGeneric.Select<COM.OA.Entity.wc_assetmanage>(System.Data.CommandType.StoredProcedure, "wc_isscrap", parameter);%>
        <%foreach (COM.OA.Entity.wc_assetmanage l in list)%>
        <%{ %>
        <tr bgcolor="#FFFFFF">
           <%                       
             int uid = loginuser.u_id;
             string where = "op_u_id='{0}'";
             where = string.Format(where, uid);
             System.Collections.Generic.IList<COM.OA.Entity.operate> lists = COM.OA.BLL.operateBLL.Select(where);
             if (lists.Count != 0)
             {
                 COM.OA.Entity.operate op = lists[0];
                 if (op.op_pop_id > 1)
                 {
                                %>
                               <td bgcolor="#FFFFFF"><div align="center"><a href="zcxg.aspx?xid=<%=l.Am_id %>"><%=l.Am_assetname%></a></div></td>
                                <%
             }
             else
             {
                                %>
                               <td bgcolor="#FFFFFF"><div align="center"><%=l.Am_assetname%></div></td>
                                <%
             }
         }
         else
         {
                            %>
                               <td bgcolor="#FFFFFF"><div align="center"><%=l.Am_assetname%></div></td>
                                <%
             }
                        	    	    
				    %>
          <%
             string deliverusetim = l.Am_deliverusetime.ToString("yyyy-MM-dd");
             string del = "";
             if (deliverusetim.Equals("1753-01-01"))
             {
                 del = "";
             }
             else
             {
                 del = deliverusetim;
             }  
          %>
          <td><div align="center"><%=del%></div></td>
          <td><div align="center"><%=l.Dept_department%></div></td>
          <td><div align="center"><%=l.Am_production%></div></td>
          <%
             string productiondate = l.Am_productiondate.ToString("yyyy-MM-dd");
             string pr = "";
             if (productiondate.Equals("1753-01-01"))
             {
                 pr = "";
             }
             else
             {
                 pr = productiondate;
             }  
          %>
          
          <td><div align="center"><%=pr%></div></td>
          <td><div align="center"><%=l.Am_buyprice%></div></td>
          <td><div align="center"><%=l.Am_installcost%></div></td>
          <td><div align="center"><%=l.Am_depreciationcost%></div></td>
          <td><div align="center"><%=l.Am_betvalue%></div></td>
        </tr>
        <%} %>    
      </table>
      <p></p></td>
    </tr>
  </table>
</div>
<div align="center">共 <%=list.Count%> &nbsp;<%} %>条记录
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
 <a href="javascript:history.go(-1)"><img alt="" src="../images/images_wc/back.gif" width="37" height="45" border="0"/></a></div>
    </form>
</body>
</html>
